home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / gui / gengui.lha / GenGui / Examples / back_def.h next >
Encoding:
C/C++ Source or Header  |  1994-04-29  |  2.6 KB  |  110 lines

  1. /*
  2.  * Source generated by GenGui V1.0
  3.  * which is (c)1994 by Matthias Meixner
  4.  */
  5.  
  6. #ifndef _GUI_LAYOUT
  7. #define _GUI_LAYOUT
  8.  
  9. #include <exec/types.h>
  10. #include <libraries/gadtools.h>
  11. #include <proto/gadtools.h>
  12.  
  13. #include <intuition/gadgetclass.h>
  14. #define GL_VBOX -1
  15. #define GL_HBOX -2
  16. #define CUSTOM_KIND -3
  17.  
  18. #define MODE_NEW     0
  19. #define MODE_RESIZE  1
  20. #define MODE_REFRESH 2
  21. #define MODE_FREE    3
  22. #define MODE_BACKUP  4
  23. #define MODE_RESTORE 5
  24.  
  25. #define BOXFLG_CUSTOM   1
  26. #define BOXFLG_STRING   2
  27. #define BOXFLG_INTEGER  4
  28. #define BOXFLG_DISABLED 8
  29. #define BOXFLG_BACKUP  16
  30. #define BOXFLG_INITED  (1<<15)
  31.  
  32. #define GetString(g) (((struct StringInfo * )g->SpecialInfo)->Buffer)
  33. #define GetNumber(g) (((struct StringInfo * )g->SpecialInfo)->LongInt)
  34. #define GetInfo(g) ((struct GadInfo *)((g)->UserData))
  35. #define GetUserData(g) (GetInfo(g)->UserData)
  36.  
  37. struct GadDim {
  38.    int Kind;
  39.    USHORT Rx,Ry,Cx,Cy,Px,Py,SRx,SRy,SPx,SPy;
  40.    USHORT Flags;
  41. };
  42.  
  43. struct Box {
  44.    struct GadDim Dim;
  45.    struct Box **Entry;
  46. };
  47.  
  48. struct WinInfo {
  49.    struct Box *Box;
  50.    struct Gadget **Gadgets;
  51.    struct Gadget *Prev;
  52.    struct Window *Window;
  53.    struct Gadget *GList;
  54.    int FontX,FontY;
  55.    struct TextAttr TextAttr;
  56.    APTR Visual;
  57.    char Mode,Render;
  58.    USHORT MinX,MinY;
  59. };
  60.  
  61. struct GadInfo {
  62.    struct GadDim dim;
  63.    int XSpace,YSpace,GadNum;
  64.    int (*CustomFunc)(struct WinInfo *WInfo,
  65.                      struct NewGadget *NewGad,
  66.                      struct GadInfo *GadInfo,
  67.                      int Left, int Top, int Width, int Height);
  68.    struct TextAttr *TextAttr;
  69.    char *Text;
  70.    int GadgetID;
  71.    ULONG Flags,UserData;
  72.    int(*HookFunc)(struct IntuiMessage *);
  73.    ULONG *Tags;
  74.    ULONG *SaveTags;
  75.    ULONG Code;
  76.    struct Gadget *ThisGad;
  77. };
  78.  
  79. int RenderGui(struct Window *win, struct WinInfo *winfo);
  80. int ResizeGui(struct WinInfo *winfo);
  81. int RefreshGui(struct WinInfo *winfo);
  82. void FreeGui(struct WinInfo *winfo);
  83. void StopGui(struct WinInfo *winfo);
  84. int SubGui(struct WinInfo *, struct WinInfo *,int ,int ,int , int );
  85.  
  86. void ClearWindow(struct Window *);
  87. struct IntuiMessage *Gui_GetIMsg(struct MsgPort *userport,struct IntuiMessage *);
  88.  
  89. BOOL Gui_SetGadgetAttrs(struct Gadget *,struct Window *,
  90.                         struct Requester *, ULONG ,...);
  91. BOOL Gui_SetGadgetAttrsA(struct Gadget *,struct Window *,
  92.                         struct Requester *, ULONG *);
  93. #endif
  94.  
  95. #define InnerField_RED 0
  96. #define InnerField_GREEN 1
  97. #define InnerField_BLUE 2
  98. #define InnerField_0 3
  99.  
  100. extern struct Gadget *InnerField_Gadgets[];
  101. extern struct WinInfo InnerField;
  102.  
  103. #define TestPro_99 0
  104. #define TestPro_4 1
  105. #define TestPro_5 2
  106.  
  107. extern struct Gadget *TestPro_Gadgets[];
  108. extern struct WinInfo TestPro;
  109.  
  110.